IF EXISTS (SELECT * from dbo.sysobjects WHERE id = object_id(N'[dbo].[SelectDetallePedidoByIdPedido]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
	drop procedure [dbo].[SelectDetallePedidoByIdPedido]
GO

CREATE PROCEDURE [dbo].[SelectDetallePedidoByIdPedido]
(
	@IdPedido int
)
AS
BEGIN
	SET NOCOUNT ON

	SELECT
	[IdPedido],
	[IdProducto],
	[Cantidad],
	[Precio],
	[Descuento]
	FROM [DetallePedido]
	WHERE [IdPedido] = @IdPedido

	SET NOCOUNT OFF
END

GO
